#coding:utf-8
from django.conf.urls import patterns


urlpatterns = patterns('lovewith.account.views',
    (r'^sign/', 'auth.auth_sign'),
    (r'^join/', 'auth.auth_join'),
    (r'^sign_out/', 'auth.sign_out'),
    (r'^auth/sina/', 'auth.auth_by_weibo'),
    (r'^auth/qq/', 'auth.auth_by_qq'),
    #php与python通信
    (r'^auth/sso/', 'auth.auth_sso'),
    #用户主页
    (r'^(?P<user_id>\d+)/$', 'home.show_user_home'),
    (r'^(?P<user_id>\d+)/like/$', 'home.get_like_share'),
    (r'^(?P<user_id>\d+)/album/all/$', 'home.get_user_album'),
    (r'^(?P<user_id>\d+)/album/(?P<album_id>\d+)/(?P<page_no>\d+)?', 'home.get_album_by_id'),

    (r'^subscribe/(?P<tag>[\w\"]+)/(?P<page_no>\d+)?', 'home.get_user_subscribe'),
    #通知
    (r'^message/', 'notice.show_all_message'),
    #找回密码
    (r'^getpasswd/', 'auth.get_password'),

    #设置
    (r'^setting/biz/$', 'setting.edit_biz_data'),
    #(r'^setting/cate/$', 'setting.edit_biz_cate'),
    (r'^setting/info/$', 'setting.edit_user_data'),

    #判断用户名(邮箱)是否重复
    (r'^ajax/checkuser/', 'ajax.check_username'),
    #上传头像
    (r'^ajax/p/upload/avatar/', 'ajax.upload_avatar'),
    #登录
    (r'^ajax/sign', 'ajax.sign'),
    #注册
    (r'^ajax/join', 'ajax.join'),
    #更新用户数据
    (r'^ajax/p/update_biz', 'ajax.update_biz_data'),
    (r'^ajax/get/subscribe', 'ajax.get_user_subscribe_by_page'),
    (r'^ajax/get/album_share', 'ajax.get_share_by_album'),
    (r'^ajax/update/user_data', 'ajax.update_user_base_data'),
    (r'^ajax/update/avatar', 'ajax.update_avatar'),
    (r'^ajax/update/auth', 'ajax.update_auth_data'),
    (r'^ajax/delete/auth', 'ajax.delete_auth_data'),
    (r'^ajax/update/sync', 'ajax.update_sync'),
    #更新分类
    #(r'^ajax/update_cate/', 'ajax.update_biz_cate'),

    #获取婚礼信息
    (r'^ajax/get/wedding/', 'ajax.get_wedding_data'),
    #更新婚礼信息
    (r'^ajax/update/wedding/', 'ajax.update_wedding_data'),

    #获取分页通知
    (r'^ajax/g/notice/', 'ajax.get_notice_by_page'),
    #获取分页通知
    (r'^ajax/g/unread_notice_count/', 'ajax.get_unread_notice_count'),
    #删除通知
    (r'^ajax/g/del_notice/', 'ajax.delete_notice'),

    #(r'^convert/avatar/', 'tools.convert_user_avatar'),

    #更新预定用户信息
    (r'^ajax/update_reserve_data/', 'ajax.update_reserve_data'),

    #发送找回密码的邮件
    (r'^ajax/g/send_get_password_mail/', 'ajax.send_get_password_mail'),
    #发送找回密码的邮件
    (r'^ajax/p/save_new_password/', 'ajax.save_new_password'),
)